<template>
  <div class="app">
    <h2>{{ str }}</h2>
    <h2 v-html="str"></h2>
  </div>
</template>

<script>
  export default {
    name:'App',
    data() {
      return {
        str:'<a href="javascript:alert(1)">点我去学习</a>'
      }
    },
  }
</script>

<style>
  .app {
    background-color: #ddd;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px;
  }
</style>